package com.huawei.appmarket.service.store.awk.card;

import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
import com.huawei.appgallery.foundation.card.base.card.BaseDistCard;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appmarket.service.appdetail.bean.detail.DetailAppInfoBean;
import o.azb;
import o.cep;
import o.cgz;
import o.epw;
import o.ewm.j;

public class DetailAppInfoGeneralCard extends BaseDistCard {
    private TextView ʻ;
    private TextView ʼ;
    private TextView ʽ;
    private TextView ˊॱ;
    private TextView ˋ;
    private TextView ˋॱ;
    private TextView ˏॱ;
    private TextView ͺ;
    private TextView ॱˊ;
    private TextView ॱॱ;
    private TextView ᐝ;

    public /* synthetic */ cgz ˏ(View view) {
        return ˎ(view);
    }

    public DetailAppInfoGeneralCard(Context context) {
        super(context);
    }

    public DetailAppInfoGeneralCard ˎ(View view) {
        azb.ˏ(view, j.ʾꜟ);
        azb.ॱ(view, j.ˇ);
        this.ˏॱ = (TextView) view.findViewById(j.ʼﾞ);
        this.ˋ = (TextView) view.findViewById(j.ˋﾟ);
        this.ᐝ = (TextView) view.findViewById(j.ˋˈ);
        this.ʻ = (TextView) view.findViewById(j.ˋᐨ);
        this.ॱॱ = (TextView) view.findViewById(j.ˋᶥ);
        this.ʽ = (TextView) view.findViewById(j.ᐝˊ);
        this.ʼ = (TextView) view.findViewById(j.ˉˈ);
        this.ˋॱ = (TextView) view.findViewById(j.ʽߵ);
        this.ॱˊ = (TextView) view.findViewById(j.ﹺˏ);
        this.ͺ = (TextView) view.findViewById(j.ʿᐧ);
        this.ˊॱ = (TextView) view.findViewById(j.ᐠ);
        ʽ(view);
        return this;
    }

    public void ˏ(CardBean cardBean) {
        DetailAppInfoBean detailAppInfoBean = (DetailAppInfoBean) cardBean;
        if (detailAppInfoBean != null) {
            long ᐝˋ;
            ˎ(this.ʼ, this.ˋ, detailAppInfoBean.ˊ());
            ˎ(this.ͺ, this.ॱॱ, detailAppInfoBean.ॱ());
            if (detailAppInfoBean.ॱᶥ() == 1 && cep.ˏ() && detailAppInfoBean.ᐝˋ() > 0) {
                ᐝˋ = detailAppInfoBean.ᐝˋ();
            } else {
                ᐝˋ = detailAppInfoBean.ˉ();
            }
            if (ᐝˋ <= 0) {
                this.ᐝ.setVisibility(8);
                this.ˋॱ.setVisibility(8);
            } else {
                this.ᐝ.setText(epw.ˊ(ᐝˋ));
            }
            ˎ(this.ॱˊ, this.ʻ, detailAppInfoBean.ʽ());
            ˎ(this.ˊॱ, this.ʽ, detailAppInfoBean.ꜟ());
            if (TextUtils.isEmpty(detailAppInfoBean.ꜞ())) {
                this.ˏॱ.setVisibility(8);
                return;
            }
            this.ˏॱ.setVisibility(0);
            this.ˏॱ.setText(detailAppInfoBean.ꜞ());
        }
    }

    private void ˎ(TextView textView, TextView textView2, String str) {
        if (TextUtils.isEmpty(str)) {
            textView.setVisibility(8);
            textView2.setVisibility(8);
            return;
        }
        textView2.setText(str);
    }
}
